package cate.game.role.login;

import cp.solution.define.Lang;
import easy.java.dev.note.NoteField;
import org.apache.commons.lang3.StringUtils;

public class RoleCreateParam {

    @NoteField("姓名")
    public String name;

    @NoteField("性别")
    public byte sex;

    @NoteField("语言编码")
    public String langCode;

    @NoteField("访客ID")
    public String visitorId;

    @NoteField("邀请码")
    public String inviteCode;

    public void fix() {
        if(StringUtils.isBlank(langCode)) {
            this.langCode = Lang.zh_CN.value;
        }
        this.name = StringUtils.trim(name);
        this.name = name.replace(" ", "");
    }
}
